home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Internet Tools 1995 April / Internet Tools.iso / dos_win / winsock / maillist / 94-02.Z / 94-02 / text0177.txt < prev    next >
Encoding:
Text File  |  1994-02-28  |  1.5 KB  |  30 lines

  1.  
  2. I am programming an application between a bsd client (unixware)
  3. and a winsock server. (ftp winsock.dll version 1.1).
  4.  
  5. The connection works fine the first time client and server are run but if one
  6. of the two is stopped and restarted, the re-establised connection doesnt work.
  7.  
  8. I use select to wait for pending io and recv to read the data, recv returns 0
  9. when the server end closed (shutdown(s,2); close(s);). This much works as I
  10. expect. Then I restart the server and it waits for the client to reconnect.
  11. But after accepting a re-connection from the client, select fires 
  12. (on the newly accepted socket) and recv returns 0 indicating a remote reset 
  13. by the client. This is not what I expect and I dont see a way around it. 
  14.  
  15. Does anybody have any ideas or similar experiences? Are there any sockopts I 
  16. can set or get to control the situation?
  17.  
  18. Any suggestions welcomed, thanks
  19.  
  20. /*-----------------------+-------------------------------------------------+
  21. |                        |                                                 |
  22. |     John Vogelsang     |  ACSnet:  fjv@research.otc.com.au               |
  23. |    R & D Contractor    |    UUCP:  {uunet,mcvax}!research.otc.com.au!fjv |
  24. |  Visual Communications |   voice:  +61 (02) 287 5000 x 3173              |
  25. |                        |   video:  t.b.a. r.s.n. (ask me!)               |
  26. |      Telstra           |   Snail:  GPO Box 7000, Sydney 2001, Australia  |
  27. |   (OTC Australia)      |           floor 7, 0xff Elizabeth Street        |
  28. +------------------------+------------------------------------------------*/
  29.  
  30.